package com.yanqu.road.entity.qixi;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

@FieldTypeAnnotation(tableName = "t_u_qixi_gift", desc = "七夕礼物数据")
public class UserQixiGiftData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true, desc = "活动id")
    private int activityId;
    @FieldTypeAnnotation(select = true, update = true, desc = "用户id")
    private long userId;
    @FieldTypeAnnotation(desc = "对方id")
    private long targetUserId;
    @FieldTypeAnnotation(desc = "花id")
    private int flowerId;
    @FieldTypeAnnotation(desc = "花数量")
    private int flowerCount;
    @FieldTypeAnnotation(desc = "送礼时间")
    private long giftTime;
    @FieldTypeAnnotation(desc = "留言")
    private String content = "";
    @FieldTypeAnnotation(desc = "状态")
    private int status;

    public UserQixiGiftData(int activityId, long userId, long targetUserId, long giftTime) {
        this.activityId = activityId;
        this.userId = userId;
        this.targetUserId = targetUserId;
        this.giftTime = giftTime;
        setInsertOption();
    }

    public UserQixiGiftData() {
    }

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public long getTargetUserId() {
        return targetUserId;
    }
    public void setTargetUserId(long targetUserId) {
        if (this.targetUserId != targetUserId) {
            this.targetUserId = targetUserId;
            setOp(DataStatus.Update);
        }
    }

    public int getFlowerId() {
        return flowerId;
    }
    public void setFlowerId(int flowerId) {
        if (this.flowerId != flowerId) {
            this.flowerId = flowerId;
            setOp(DataStatus.Update);
        }
    }

    public int getFlowerCount() {
        return flowerCount;
    }
    public void setFlowerCount(int flowerCount) {
        if (this.flowerCount != flowerCount) {
            this.flowerCount = flowerCount;
            setOp(DataStatus.Update);
        }
    }

    public long getGiftTime() {
        return giftTime;
    }
    public void setGiftTime(long giftTime) {
        if (this.giftTime != giftTime) {
            this.giftTime = giftTime;
            setOp(DataStatus.Update);
        }
    }

    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        if (content == null){
            return;
        }
        if (this.content == null || !this.content.equals(content)) {
            this.content = content;
            setOp(DataStatus.Update);
        }
    }

    public int getStatus() {
        return status;
    }
    public void setStatus(int status) {
        if (this.status != status) {
            this.status = status;
            setOp(DataStatus.Update);
        }
    }
}
